/**
 * Copyright (c) Daniel Centore
 *
 * ex: set filetype=java expandtab tabstop=4 shiftwidth=4 :
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation.
 */
package ronp.anim.data.filmstrip;

import java.io.Serializable;

import ronp.anim.data.Grip;

/**
 * Represents a layer of animation. A layer controls a single grip.
 * 
 * @author Daniel Centore
 *
 */
public class Layer implements Serializable
{
	private static final long serialVersionUID = 1L;

	private Grip grip; // The grip this layer controls

	/**
	 * Creates a {@link Layer}
	 * @param grip The grip this layer will be controlling
	 */
	public Layer(Grip grip)
	{
		this.grip = grip;
	}

	/**
	 * @return The grip we control
	 */
	public Grip getGrip()
	{
		return grip;
	}

	/**
	 * Sets the controlling {@link Grip} of this layer
	 * @param grip {@link Grip} to set it to
	 */
	public void setGrip(Grip grip)
	{
		this.grip = grip;
	}

	@Override
	public String toString()
	{
		return "Layer [grip=" + grip + "]";
	}

}
